package com.topsun.posclient.system.dao;

import java.io.File;

import org.springframework.stereotype.Repository;

import com.topsun.posclient.common.dao.LocalDataProcessor;
import com.topsun.posclient.common.util.AppConstants;
import com.topsun.posclient.common.util.ProjectUtil;
import com.topsun.posclient.system.entity.OperatorDTO;

/**
 * @author Dong
 *
 */
@Repository("operatorLocalDao")
public class OperatorLocalDao extends LocalDataProcessor {
	
	/**
	 * 获取用户
	 * @return
	 * @throws Exception
	 */
	public OperatorDTO getOperatorData() throws Exception {
		File file = new File(ProjectUtil.getRuntimeClassPath() + AppConstants.DATA_USER_FILENAME);
		OperatorDTO operatorDTO = (OperatorDTO) this.getObjectFromXml(getDataFileContent(file), OperatorDTO.class);
		return operatorDTO;
	}

}
